package com.ruoyi.bookstore.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bookstore.mapper.BorrowCardMapper;
import com.ruoyi.bookstore.domain.BorrowCard;
import com.ruoyi.bookstore.service.IBorrowCardService;

/**
 * 借阅证Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-20
 */
@Service
public class BorrowCardServiceImpl implements IBorrowCardService 
{
    @Autowired
    private BorrowCardMapper borrowCardMapper;

    /**
     * 查询借阅证
     * 
     * @param id 借阅证主键
     * @return 借阅证
     */
    @Override
    public BorrowCard selectBorrowCardById(Long id)
    {
        return borrowCardMapper.selectBorrowCardById(id);
    }

    /**
     * 查询借阅证列表
     * 
     * @param borrowCard 借阅证
     * @return 借阅证
     */
    @Override
    public List<BorrowCard> selectBorrowCardList(BorrowCard borrowCard)
    {
        return borrowCardMapper.selectBorrowCardList(borrowCard);
    }

    /**
     * 新增借阅证
     * 
     * @param borrowCard 借阅证
     * @return 结果
     */
    @Override
    public int insertBorrowCard(BorrowCard borrowCard)
    {
        return borrowCardMapper.insertBorrowCard(borrowCard);
    }

    /**
     * 修改借阅证
     * 
     * @param borrowCard 借阅证
     * @return 结果
     */
    @Override
    public int updateBorrowCard(BorrowCard borrowCard)
    {
        return borrowCardMapper.updateBorrowCard(borrowCard);
    }

    /**
     * 批量删除借阅证
     * 
     * @param ids 需要删除的借阅证主键
     * @return 结果
     */
    @Override
    public int deleteBorrowCardByIds(Long[] ids)
    {
        return borrowCardMapper.deleteBorrowCardByIds(ids);
    }

    /**
     * 删除借阅证信息
     * 
     * @param id 借阅证主键
     * @return 结果
     */
    @Override
    public int deleteBorrowCardById(Long id)
    {
        return borrowCardMapper.deleteBorrowCardById(id);
    }
}
